﻿#define Buged //C#的宏定义必须在所有代码之前。当前只让Buged宏有效
//#define NoBug
//#define Li
//#define Zhang
using System;
using System.Diagnostics;
namespace AttributeTest
{
    class Program
    {
        static void MainAttributeTest(string[] args)
        {
            ToolKit.FuncA();
            ToolKit.FuncB();
            ToolKit.FuncC();
            ToolKit.FuncD();
            Console.ReadKey();
        }
    }
}


namespace AttributeTest
{
    public class ToolKit
    {
        [Conditional("Li")]
        [Conditional("Buged")]
        public static void FuncA()
        {
            Console.WriteLine("Created by Li, Buged");
        }

        [Conditional("Li")]
        [Conditional("NoBug")]
        public static void FuncB()
        {
            Console.WriteLine("Created by Li, NoBug");
        }

        [Conditional("Zhang")]
        [Conditional("Buged")]
        public static void FuncC()
        {
            Console.WriteLine("Created by Zhang, Buged");
        }

        [Conditional("Zhang")]
        [Conditional("NoBug")]
        public static void FuncD()
        {
            Console.WriteLine("Created by Zhang, NoBug");
        }
    }
}